Optimal. Leaf size=45 \[ \frac{2 a^2 \sin (c+d x)}{d}+\frac{a^2 \sin (c+d x) \cos (c+d x)}{2 d}+\frac{3 a^2 x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0140222, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {2644} \[ \frac{2 a^2 \sin (c+d x)}{d}+\frac{a^2 \sin (c+d x) \cos (c+d x)}{2 d}+\frac{3 a^2 x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2644
Rubi steps
\begin{align*} \int (a+a \cos (c+d x))^2 \, dx &=\frac{3 a^2 x}{2}+\frac{2 a^2 \sin (c+d x)}{d}+\frac{a^2 \cos (c+d x) \sin (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0423232, size = 34, normalized size = 0.76 \[ \frac{a^2 (6 (c+d x)+8 \sin (c+d x)+\sin (2 (c+d x)))}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.039, size = 52, normalized size = 1.2 \begin{align*}{\frac{1}{d} \left ({a}^{2} \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) +2\,{a}^{2}\sin \left ( dx+c \right ) +{a}^{2} \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.1332, size = 61, normalized size = 1.36 \begin{align*} a^{2} x + \frac{{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2}}{4 \, d} + \frac{2 \, a^{2} \sin \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.60468, size = 82, normalized size = 1.82 \begin{align*} \frac{3 \, a^{2} d x +{\left (a^{2} \cos \left (d x + c\right ) + 4 \, a^{2}\right )} \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.252579, size = 78, normalized size = 1.73 \begin{align*} \begin{cases} \frac{a^{2} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac{a^{2} x \cos ^{2}{\left (c + d x \right )}}{2} + a^{2} x + \frac{a^{2} \sin{\left (c + d x \right )} \cos{\left (c + d x \right )}}{2 d} + \frac{2 a^{2} \sin{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \left (a \cos{\left (c \right )} + a\right )^{2} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.36878, size = 51, normalized size = 1.13 \begin{align*} \frac{3}{2} \, a^{2} x + \frac{a^{2} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac{2 \, a^{2} \sin \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]